package ${classPath};

import java.math.BigDecimal;
import java.util.Date;
import java.util.Set;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Digits;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

@Data
@ToString
@ApiModel(value = "${classComment}查询")
public class  ${domain}QueryCommand {

<#list fieldList as field>
<#compress>
  /** ${field.comment} */<#list field.annotations as annotation> 
<#if field.name!="id">
  <#if !annotation?starts_with("@Co")&&!annotation?starts_with("@En")>
    ${annotation}
  </#if>
</#if>
</#list>
</#compress>

  @ApiModelProperty(value = "${field.comment}")
  private ${field.type} ${field.name};

<#if field.name?ends_with("ype") || field.name?ends_with("tatus")>
  /** 排除${field.comment} */
  @Size(max = 5)
  @ApiModelProperty(value = "排除${field.comment}")
  private Set<${field.type}> exclude${field.name?cap_first};
 
  /** 包含${field.comment} */
  @Size(max = 5)
  @ApiModelProperty(value = "包含${field.comment}")
  private Set<${field.type}> include${field.name?cap_first};
</#if>
</#list>
  
  /** 创建时间 */
  private TimeRange createTime; 
 
  public ${domain}Query convertToQuery() {
    ${domain}Query query = new ${domain}Query();
    BeanUtils.copyPropertiesIgnoreNull(this, query);
    return query;
  }
}